﻿<Application x:Class="CjcPhotoPrint.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:CjcPhotoPrint"
    Startup="Application_Startup">

    <Application.Resources>

		<Style x:Key="CheckBoxFocusVisual">
			<Setter Property="Control.Template">
				<Setter.Value>
					<ControlTemplate>
						<Border>
							<Rectangle Margin="15,0,0,0"
									   StrokeThickness="1"
									   Stroke="#60000000"
									   StrokeDashArray="1 2"/>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

		<!-- Fill Brushes -->

		<LinearGradientBrush x:Key="NormalBrush" StartPoint="0,0" EndPoint="0,1">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#F0FFF0" Offset="0.0"/>
					<GradientStop Color="#CCEECC" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="HorizontalNormalBrush" StartPoint="0,0" EndPoint="1,0">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#FFF" Offset="0.0"/>
					<GradientStop Color="#CCC" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#FFF" Offset="0.0"/>
					<GradientStop Color="#EEE" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="HorizontalLightBrush" StartPoint="0,0" EndPoint="1,0">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#FFF" Offset="0.0"/>
					<GradientStop Color="#EEE" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#F0FFF0" Offset="0.0"/>
					<GradientStop Color="#AAC0AA" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#BBB" Offset="0.0"/>
					<GradientStop Color="#EEE" Offset="0.1"/>
					<GradientStop Color="#EEE" Offset="0.9"/>
					<GradientStop Color="#FFF" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />

		<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />

		<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />

		<SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD" />

		<!-- Border Brushes -->

		<LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#CCC" Offset="0.0"/>
					<GradientStop Color="#444" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="HorizontalNormalBorderBrush" StartPoint="0,0" EndPoint="1,0">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#CCC" Offset="0.0"/>
					<GradientStop Color="#444" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="DefaultedBorderBrush" StartPoint="0,0" EndPoint="0,1">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#777" Offset="0.0"/>
					<GradientStop Color="#000" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
			<GradientBrush.GradientStops>
				<GradientStopCollection>
					<GradientStop Color="#444" Offset="0.0"/>
					<GradientStop Color="#888" Offset="1.0"/>
				</GradientStopCollection>
			</GradientBrush.GradientStops>
		</LinearGradientBrush>

		<SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />

		<SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />

		<SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />

		<!-- Miscellaneous Brushes -->
		<SolidColorBrush x:Key="GlyphBrush" Color="#444" />

		<SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />

		<Style x:Key="thumbnailCheckbox" TargetType="CheckBox">
			<Setter Property="SnapsToDevicePixels" Value="true"/>
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="FocusVisualStyle" Value="{StaticResource CheckBoxFocusVisual}"/>
			<Setter Property="Template">
				<Setter.Value>
					<!--<ControlTemplate>
						<Grid>
							<Ellipse StrokeThickness="1" Fill="White"/>
							<Path x:Name="tick" Opacity="1" Margin="2"
											  Width="12" Height="12" HorizontalAlignment="Left"
											  Stroke="#005000" StrokeThickness="2"
											  Data="M3,6 L5,9 9,2"
											  Visibility="{TemplateBinding IsChecked, Converter={StaticResource boolVisibilityConverter}}"/>
						</Grid>
					</ControlTemplate> -->
					<ControlTemplate TargetType="CheckBox">
						<BulletDecorator Background="Transparent">
							<BulletDecorator.Bullet>
								<Grid Name="Container" HorizontalAlignment="Left" VerticalAlignment="Top" Width="16" Height="16">
									<Ellipse Fill="{StaticResource NormalBrush}"/>
									<Ellipse x:Name="Border" StrokeThickness="1" Stroke="{StaticResource NormalBorderBrush}"/>
									<Path x:Name="CheckMark"
										  Margin="2"
										  Stroke="{StaticResource GlyphBrush}"
										  StrokeThickness="2"
										  Data="M3,6 L5,9 9,2"/>
								</Grid>
								<!--
								<Border x:Name="Border"
										Width="13" 
										Height="13" 
										CornerRadius="0"
										Background="{StaticResource NormalBrush}"
										BorderThickness="1"
										BorderBrush="{StaticResource NormalBorderBrush}">
									<Path Width="7" Height="7" 
										  x:Name="CheckMark"
										  SnapsToDevicePixels="False"
										  Stroke="{StaticResource GlyphBrush}"
										  StrokeThickness="2"
										  Data="M 0 0 L 7 7 M 0 7 L 7 0" />
								</Border>-->
							</BulletDecorator.Bullet>
							<ContentPresenter Margin="4,0,0,0"
											  VerticalAlignment="Center"
											  HorizontalAlignment="Left"
											  RecognizesAccessKey="True"/>
						</BulletDecorator>
						<ControlTemplate.Triggers>
							<Trigger Property="IsChecked" Value="false">
								<Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
								<Setter TargetName="Container" Property="Opacity" Value="0.7"/>
							</Trigger>
							<Trigger Property="IsChecked" Value="{x:Null}">
								<Setter TargetName="CheckMark" Property="Data" Value="M 0 7 L 7 0" />
							</Trigger>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter TargetName="Border" Property="Fill" Value="{StaticResource DarkBrush}" />
							</Trigger>
							<Trigger Property="IsPressed" Value="true">
								<Setter TargetName="Border" Property="Fill" Value="{StaticResource PressedBrush}" />
								<Setter TargetName="Border" Property="Stroke" Value="{StaticResource PressedBorderBrush}" />
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter TargetName="Border" Property="Fill" Value="{StaticResource DisabledBackgroundBrush}" />
								<Setter TargetName="Border" Property="Stroke" Value="{StaticResource DisabledBorderBrush}" />
								<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

	</Application.Resources>

</Application>
